package com.cyzy.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.cyzy.dto.StudentDto;
import com.cyzy.dto.TeacherCouserDto;
import com.cyzy.dto.TeacherDto;
import com.cyzy.dto.parentDto;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * @author cuncun
 * @create 2025-06-19 下午7:31
 */
@Mapper
public interface CourseMapper extends BaseMapper<TeacherCouserDto> {

    List<TeacherCouserDto> teacherDate(@Param("date") String date,@Param("teacherId") Integer teacherId);

    List<StudentDto> studentName(@Param("parentId") Integer parentId);

    List<TeacherCouserDto> studentCla(@Param("userName") String userName);

    @Select("select parentUrl,parentName from courseParent where parentId = #{parentId}")
    parentDto parentUrl(@Param("parentId") Integer parentId);

    List<TeacherCouserDto> courseInformation(@Param("claId") Integer claId,@Param("startDate") String startDate,@Param("endDate") String endDate);

    List<TeacherCouserDto> dateSelectCourse(@Param("claId") Integer claId,@Param("date") String date);

    @Select("select avatar,nick_name from sys_user where user_id = #{teacherId}")
    TeacherDto teacherUrl(@Param("teacherId") Integer teacherId);
}
